/*
 * 基础能力
 * */

import http from '@/utils/http';

/*
 * 个性化词典
 * */
//  个性化词典列表
export async function dictionaryList(params) {
  return http.post('/cloud/new/basic/dict/list', params);
}

// 个性化词典删除
export async function dictionaryDelete(params) {
  return http.post('/cloud/new/basic/dict/delete', params);
}

//  个性化词典添加
export async function dictionaryAdd(params) {
  return http.post('/cloud/new/basic/dict/addDictionary', params);
}

//  个性化词典修改名称
export async function dictionaryUpdateDictName(params) {
  return http.postWithStatus('/cloud/dict/updateDictName', params);
}

// 个性化词典枚举字段列表
export async function loadDictItemsForJson(params) {
  return http.post('/cloud/dict/loadDictItemsJson', params);
}

// 个性化词典枚举字段列表 可枚举类型
export async function enumList(params) {
  return http.post('/cloud/new/basic/dict/enum/list', params);
}

// 个性化词典枚举字段列表 不可枚举类型
export async function unEnumList(params) {
  return http.post('/cloud/new/basic/dict/unEnum/list', params);
}

// 个性化词典枚举字段 新增/修改
export async function  dictionaryEditDictItems(params) {
  return http.postCode('/cloud/new/basic/dict/detail/enum/save', params);
}

// 个性化词典枚举字段 删除
export async function dictionaryDelDictItems(params) {
  return http.post('/cloud/new/basic/dict/detail/enum/delete', params);
}

// 个性化词典 非枚举 保存
export async function editAllDictItems(params) {
  return http.postWithStatus('/cloud/dict/editAllDictItems', params);
}

// 导出
export async function exporta(params) {
  return http.downloadFile('/cloud/new/basic/dict/export', params);
}

// 下载xlsx模版
export async function templateA(params) {
  return http.downloadFile('/cloud/new/basic/dict/import/template', params);
}

// 系统实体列表
export async function BasicDictSysList(params) {
  return http.getToken('/cloud/new/basic/dict/sys/list', params);
}

// 实体管理 使用中词槽列表
export async function basicDictSlotList(params) {
  return http.postData('/cloud/new/basic/dict/slot/list', params);
}

// 词槽管理 词槽使用中的多轮列表
export async function basicSlotDialogList(params) {
  return http.postData('/cloud/new/basic/slot/dialog/list', params);
}

// 词槽管理 词槽使用中的知识点列表
export async function basicSlotQaList(params) {
  return http.postData('/cloud/new/basic/slot/qa/list', params);
}





/*
 * 词槽管理
 * */

 // 加载词槽列表
 export async function slotList(params) {
  return http.post('/cloud/new/basic/slot/getSlotList', params);
}

 // 词槽添加/修改接口
 export async function slotAddModification(params) {
  return http.post('/cloud/new/basic/slot/save', params);
}

 // 删除词槽接口
 export async function wordTroughDelete(params) {
  return http.post('/cloud/new/basic/slot/delSlot', params);
}

// 查询词槽信息接口
export async function querySlotInformation(params) {
  return http.post('/cloud/new/basic/slot/detail', params);
}

// 实体管理 系统实体列表
export async function basicDictSysList(params) {
  return http.getToken('/cloud/new/basic/dict/sys/list', params);
}

// 实体管理 自定义实体列表
export async function basicDictList(params) {
  return http.postData('/cloud/new/basic/dict/list', params);
}





/*
* 流程引导模版
* */

// 查询流程引导模版列表

export  async function fetchProcessListById(params) {
  return http.post('/cloud/induce/getInduces', params)
}

// 删除流程引导

export  async function delProcessById(params) {
  return http.post('/cloud/induce/removeInduce', params)
}

// 查看流程引导模版

export  async function seeProcessDetailById(params) {
  return http.post('/cloud/induce/getInduceData', params)
}


/*
* 自定义api
* */

// api列表

export  async function fetchApiListById(params) {
  return http.post('/cloud/new/basic/custom/api/list', params)
}

// 删除API

export  async function delApiById(params) {
  return http.post('/cloud/new/basic/custom/api/delete ', params)
}

// 保存API

export  async function saveApi(params) {
  return http.post('/cloud/new/basic/custom/api/save', params)
}

// 查询api详细信息

export  async function fetchApiDetailById(params) {
  return http.post('/cloud/api/actionApi/loadActionApi', params)
}

// 测试api

export  async function testActionApi(params) {
  return http.post('/cloud/api/actionApi/testActionApi', params)
}
/*
* 业务词库
* */

// 业务词库列表
export  async function businessThesaurusList(params) {
  return http.post('/cloud/robot/getTermsJson', params)
}

// 业务词配置 添加业务词
export  async function configurationNew(params) {
  return http.post('/cloud/new//basic/lexicon/addTerm', params)
}

// 业务词配置 删除业务词
export  async function deployDelete(params) {
  return http.post('/cloud/new//basic/lexicon/delTerm', params)
}

// 业务词库 导入业务词
export  async function lexiconImport(params) {
  return http.get('/cloud/new/basic/lexicon/import', params)
}

// 业务词库 导入摸板下载
export async function lexiconTemplate(params) {
  return http.downloadFile('/cloud/new/basic/lexicon/import/template', params);
}

// 业务词库 导出业务词
export  async function lexiconExport(params) {
  return http.downloadFile('/cloud/new/basic/lexicon/export', params)
}

/*
* 同义词
* */

// 同义词列表
export  async function cognatesList(params) {
  return http.post('/cloud/robot/align/listJson', params)
}

// 同义词 新增/修改
export  async function cognatesListNewAlter(params) {
  return http.postCode('/cloud/new/basic/synonym/save', params)
}

// 同义词 删除
export  async function cognatesDelete(params) {
  return http.post('/cloud/robot/align/remove', params)
}

// 同义词 导入模版下载
export  async function synonymtemplate(params) {
  return http.downloadFile('/cloud/new/basic/synonym/import/template', params)
}

// 同义词 导出
export  async function synonymexport(params) {
  return http.downloadFile('/cloud/new/basic/synonym/export', params)
}

// 查询qa api使用情况
export  async function apiUseConditionByQa(params) {
  return http.post('/cloud/new/basic/custom/api/qa/list', params)
}

// 查询dialog api使用情况
export  async function apiUseConditionByDialog(params) {
  return http.post('/cloud/new/basic/custom/api/dialog/list', params)
}
